package com.sky.config;

import com.sky.properties.AliOssProperties;
import com.sky.utils.AliOssUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @projectName: HF62sky
 * @package: com.sky.config
 * @className: AliOssConfiguration
 * @author: SunGang
 * @description: TODO
 * @date: 2023/12/5 11:30
 * @version: 1.0
 */
@Configuration
public class AliOssConfiguration {
    @Autowired
    private AliOssProperties aliOssProperties;
    @Bean
    public AliOssUtil creat(){
        return new AliOssUtil(aliOssProperties.getEndpoint(),
                aliOssProperties.getAccessKeyId(),
                aliOssProperties.getAccessKeySecret(),
                aliOssProperties.getBucketName()
                );
    }
}
